<?php

namespace app\validate;

use share\validate\SceneValidate;

class VirtualDeviceValidate extends SceneValidate{
    protected $rule = [
        'id' => 'require|integer|min:0',
        'name' => 'require|length:1,60',
        'items' => 'require|array',
        'mainId' => 'require|length:10,64',
        'subId' => 'require|length:10,64',
        'subIds' => 'require|array',
        'shareId' => 'require|length:30,64',
    ];    

    protected $scene = [ 
        'set' => ['id','name','items'],
        'items' => ['mainId','subId'],
        'del' => ['id'],
        'delSub' => ['shareId','mainId','subIds'],
    ];
}